#ifndef KEYBOARDSTATEFILTER_H
#define KEYBOARDSTATEFILTER_H

#include <QObject>
#include <QMap>

class KeyboardStateFilter : public QObject
{
  Q_OBJECT

public:
  bool getKey(Qt::Key k) const;

signals:
  void keyPress(Qt::Key);
  void keyRelease(Qt::Key);

protected:
  virtual bool eventFilter(QObject *object, QEvent *event);

private:
  typedef QMap<Qt::Key, bool> KeyMap;

  KeyMap mKeys;
};

#endif
